import requests

from common.get_header import get_header
from config import URL


# 添加用户
class YYadduser(object):
    url = URL + 'user'
    header = get_header()

    @classmethod
    def yy_add_user(cls, json_data):
        resp = requests.post(url=cls.url, headers=cls.header, json=json_data)
        return resp


if __name__ == '__main__':
    # deptId：部门id
    # phonenumber：手机号
    # remark：备注
    # roleIds：岗位
    # sex：性别
    # status：状态

    data = {"nickName": "chen778", "password": "123456", "userName": "chen"}
    res = YYadduser.yy_add_user(data)
    print(res.json())
